#include<stdio.h>
#include<string.h>
void PrintWord(char *str)
{
	int i=0;
	for(;i<strlen(str);i++)
	{

		if(str[i]!=' '&&str[i]!=','&&str[i]!='.'&&str[i]!='!')
		{
			printf("%c",str[i]);
			if(str[i+1]!=' '&&str[i+1]!=','&&str[i+1]!='.'&&str[i+1]!='!');
			else printf("\n");
		}
		else
		{
			continue;
		}


	}
}
int main()
{
	 char s[100]="   I   like ,,,..    C++ programming!";
	 PrintWord(s);
	 return 0;
}
